import { ISysArticleCategory } from '/@/views/article/sysarticlecategory/api/interface';
import { IFileAttachment } from '/@/views/fileattachment/api/interface';

export interface ISysArticle {
	ID?: string | null;
	Title: string | null;
	SubTitle: string | null;
	Summary: string | null;
	Content: string | null;
	Status?: '草稿' | '已发布' | '已下线' | null;
	CategoryId: null;
	Category?: ISysArticleCategory;
	SortOrder: number | null;
	IsTop: boolean;
	IsRecommend: boolean;
	CoverImageId: null;
	CoverImage?: IFileAttachment;
	ViewCount: number;
	LikeCount: number;
	CommentCount: number;
	FavoriteCount: number;
	ShareCount: number;
	ArticleTagMappings: string | null;
	ArticleAttachments: string | null;
}

export interface ISysArticleVm {
	Entity: ISysArticle;
	ActionName?: string | null;
	IsMyApprove?: boolean | null;
	SelectedArticleTagMappingsIds: string[];
	SelectedArticleAttachmentsIds: string[];
}

export interface ISysArticleView extends ISysArticle {
	ArticleTagMappingsNames: string[];
	ArticleAttachmentsNames: string[];
}

export interface ISysArticleQuery {
	Title?: string | null;
	Status?: number | null;
	CategoryId?: string | null;
	IsTop?: boolean | null;
	IsRecommend?: boolean | null;
	SelectedArticleTagMappingsIds?: string | null;
}